Suppress duplicate 100-continue response#9975
Open
brasky wants to merge 1 commit into
Open
Conversation
Collaborator
|
Looks like this was a bug in Werkzeug (pallets/werkzeug/issues/3138) that has recently been fixed (but not yet released). I'd prefer this be handled upstream rather than with a change to Moto. Hopefully their next release will be out soon. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I have been having an issue integrating with moto using the S3 async client. I did some digging and it appears that when the S3 client includes
Expect: 100-continuein its PUT requests it gets back two responses which prevents the client from getting the actual response. It seems to be becauseWerkzeugandBaseHTTPRequestHandlerboth return a100 continueresponse. The AWS SDK v2 async Java client handles a single 100 correctly but misinterprets the second one as the final response and throws S3Exception: null (Service: S3, Status Code: 100, Request ID: null), which has been super frustrating post-localstack migration debugging this.I believe this is a reasonable fix where we are just suppressing one of the responses. My tests pass with this change at least :)
Here's a repro of the issue
Without the patch you get:
With the patch you get: